// 获取要监测的元素
const boxes = document.querySelectorAll('.slowMove')
// 创建观察者，配置回调函数
// 通过 isIntersecting 属性判断元素与视口是否相交
const observer = new IntersectionObserver((entries, observer) => {
	entries.forEach((entries) => {
		if(entries.isIntersecting){
			if(entries.target.classList.contains('animate__animated')) return
			else{
				console.log('添加')
				entries.target.classList.add('animate__fadeInUp','animate__animated')
			}								
		}
	
	});
},{
	threshold:0.25
})

boxes.forEach((box) => {
	observer.observe(box);
});